import request from '@/utils/request'

// 查询排查隐患列表
export function listDanger(query) {
  return request({
    url: '/syf/danger/list',
    method: 'get',
    params: query
  })
}

// 查询排查隐患详细
export function getDanger(id) {
  return request({
    url: '/syf/danger/' + id,
    method: 'get'
  })
}

// 新增排查隐患
export function addDanger(data) {
  return request({
    url: '/syf/danger',
    method: 'post',
    data: data
  })
}

// 修改排查隐患
export function updateDanger(data) {
  return request({
    url: '/syf/danger',
    method: 'put',
    data: data
  })
}

// 删除排查隐患
export function delDanger(id) {
  return request({
    url: '/syf/danger/' + id,
    method: 'delete'
  })
}
